About 644 letters

About 3 minutes

#eval

Description: Executes an expression and returns the result.

def eval(source: str | codeobject, /, globals: dict = None, locals: mapping = None):
    '''
    Executes an expression and returns the result

    :param source: A Python expression
    :param globals: Global namespace
    :param locals: Local namespace
    :return: The result of the expression evaluation
    '''

Example:

print(eval('1 + 1'))

x = 233
print(eval('x + 1'))

>>> Establishing WebAssembly Runtime.

>>> Standby.

Powered by Shift.

Updated: 6/9/2025

Author: PlanC

Created: 6/9/2025